﻿// -----------------------------------------------------------------------
// Copyright (c) David Kean. All rights reserved.
// -----------------------------------------------------------------------
using System;
using System.Text;
using System.Threading;
using Moq;
using Moq.Protected;

namespace Portable
{
    public static class MockFactory
    {
        public static T Create<T>()
            where T : class
        {
            var mock = CreateMock<T>();
            
            return mock.Object;
        }

        public static Mock<T> CreateMock<T>()
            where T : class
        {
            var mock = new Mock<T>();
            mock.CallBase = true;

            return mock;
        }
    }
}
